package ar.edu.unq.mongodbexample.persistence.commands;

import com.mongodb.DBCollection;

/**
 * Representa una clase base para la generacion de comandos que se impactaran sobre MongoDB
 * 
 * @author Nicolas Faure
 */
public abstract class Command<T> implements Runnable {
    private Class<T> clazz;

    private DBCollection coll;

    private T entity;

    public Command(final Class clazz) {
        this.setClazz(clazz);
    }

    public Class<T> getClazz() {
        return this.clazz;
    }

    public void setClazz(final Class<T> clazz) {
        this.clazz = clazz;
    }

    public T getEntity() {
        return this.entity;
    }

    public void setEntity(final T entity) {
        this.entity = entity;
    }

    public DBCollection getDBCollection() {
        return this.coll;
    }

    public void setDBCollection(final DBCollection coll) {
        this.coll = coll;
    }
}
